package com.hexorld.utils;

public class Coordinate {
	public int x;
	public int y;
	public int z;

	
	public Coordinate(){
		x = 0;
		y = 0;
		z = 0;
	}
	
	public Coordinate(int x, int y, int z){
		this.x = x;
		this.y = y;
		this.z = z;
	}
	
	public static Coordinate createCoordinateByPos(Position p){
		return new Coordinate(p.x / Constants.POS_TO_COOR_X, p.y / Constants.POS_TO_COOR_Y, -1);
	}
	
	public static Coordinate createCoordinateByPos(Position p, int z){
		return new Coordinate(p.x / Constants.POS_TO_COOR_X, p.y / Constants.POS_TO_COOR_Y, z);
	}
	
}
